<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue.js"></script>
   
    <style>
        html, body {
            margin: 0px;
            padding: 0px;
        }
        .container {
            height: 100vh;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .stage {
            height: 300px;
            width: 300px;
            border: 1px solid gray;
        }
        .stage .block {
            text-align: center;
            font-size: 12px;
            position: relative;
            float: left;
            height: 30px;
            width: 30px;
            background-size: 100%;
            background-image: url(./res/block.gif);
        }
        .stage .block .treasure{
            height: 25px;
            width: 25px;
            background-size: 100%;
            background-image: url(./res/ball.png);
            position: absolute;
            top: 2px;
            left: 3px;
        }
        .stage .block .index {
            position: absolute;
            top: 0px;
            width: 100%;
            text-align: center;
            font-size: 12px;
            z-index: 10;
        }
        .stage .block .agent {
            height: 38px;
            width: 30px;
            background-size: 100%;
            position: absolute;
            top: -10px;
            z-index: 11;
        }
        .stage .block .agent.left {
            background-image: url(./res/left.png);
        }
        .stage .block .agent.right {
            background-image: url(./res/right.png);
        }

    </style>
</head>
<body>
    <div class="container">
        <div class="stage">
            <div class="block" v-for = "i in 50"></div>
            <div class="block" v-for = "j in 10">
                <div class="index">{{j-1}}</div>
                <div
                    class="agent" 
                    :class="{
                        'right': x > prevX ,
                        'left': x < prevX
                    }"
                    v-if="(j-1) === x">
                    {{x}},{{prevX}}
                </div>
                <div class="treasure" v-if="j === 10"></div>
            </div>
            <div class="block" v-for = "k in 40"></div>
        </div>
    </div>
    <script src="./js/env.js"></script>
    <script src="./js/qtable.js"></script>
    <script src="./js/rl.js"></script>
    <script src="./js/main.js"></script>
</body>
</html>